/**
 * It is possible to write five as a sum in exactly six different ways:
 *
 *   4 + 1
 *   3 + 2
 *   3 + 1 + 1
 *   2 + 2 + 1
 *   2 + 1 + 1 + 1
 *   1 + 1 + 1 + 1 + 1
 *
 * How many different ways can one hundred be written as a sum of at least 
 * two positive integers?
 *
 * ANSWER: 190569291.
 */

#include <iostream>

static long long f(int n, int m)
{
	if (m == 1)
		return 1;

	long long count = 0;
	for (int s = 0; s <= n; s += m)
	{
		count += f(n - s, m - 1);
	}
	return count;
}

void solve_problem_76()
{
	std::cout << f(100, 99) << std::endl;
}
